package com.mengfx.error;

public class BizException extends RuntimeException {

	 private static final long serialVersionUID = 1L;

	 private final GlobalErrorCode errorCode;

	 public BizException(GlobalErrorCode ec, String message, Throwable cause) {
	  super(message, cause);
	  errorCode = ec;
	 }
	 
	 public BizException(GlobalErrorCode ec, String message) {
	  this(ec, message, null);
	 }

	 public BizException(GlobalErrorCode ec, Throwable cause) {
	  this(ec, null, cause);
	 }
	 
	 public GlobalErrorCode getErrorCode() {
	  return errorCode;
	 }
}
